<html lang="java">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css"></link>
    <link rel="stylesheet" href="/css/bootstrap-datetimepicker.css"></link>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="/jquery-1.10.2.min.js"></script>
    <script src="/bootstrap.min.js"></script>
    <script src="/bootstrap-datetimepicker.min.js" charset="UTF-8"></script>
    <script type="text/javascript">
       window.onload = function () {
            //下拉框选中
            var mySelect = document.getElementById("selectCity");
            var opts = mySelect.options;
            for (var i = 0; i < opts.length; i++) {
               if (opts[i].value == "${project.type!'请选择'}") {
                    opts[i].selected = true;
                }
            }
           //ok  或者  no 的选中
           var  ok = document.getElementById("ok") ;
           var  ok_values = ok.value ;
           if ("${project.status}" ==  ok_values ) {
               ok.checked = true;
           }
           var  no = document.getElementById("no") ;
           var  no_valuse = no.value ;
           if ("${project.status}" == no_valuse) {
               no.checked = true;
           }
        }
    </script>
</head>
<body  >
<h1>项目修改</h1>
<div class="row">
    <div class="col-lg-4">
        <form method="post" id="registForm" class="form-horizontal" action="/updateProject">
            <input type="hidden" name="id" value="${project.id}">
            <div class="form-group">
                <label class="col-sm-3 control-label">账号类型：</label>
                <div class="col-sm-9">
                    <select class="form-control"  name="type" id="selectCity">
<#--                        <option>请选择</option>-->
                        <#list  types as typeselect>
                            <option>${typeselect}</option>
                        </#list>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">名称：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" value="${project.name!''}" name="name" >
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">公众号：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control" value="${project.account!''}" name="account">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">创建日期：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control"  value="${project.createTime?string('yyyy-MM-dd')}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">认证：</label>
                <div class="col-sm-9">
                    <label class="control-label"><input type="radio" name="status" id="ok" value="已认证">已认证</label>
                    <label class="control-label"><input type="radio" name="status"  id="no" value="未认证">未认证</label>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-2">
                    <button type="submit" id="btn" class="btn btn-success">提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>